I remember a discussion in the old DOORS forum (for which I currently do not have access to ..) where the problem was to determine from where the module was opened e.g. directly from database explorer or through by following a link. Somebody propoced a solution to this (Louie ?) - any ideas on this?
|
Re: From where a module has been opened? There is a 'Module lastSelectedModule_()' function that tells you what was most recently selected in the Explorer. Since it returns a Module handle the module must be open. If you compared that value with the 'current Module' value, I suppose you could deduce that it was opened in the Explorer if they are the same, and opened in some other way if not. There is also a global function "Item getSelectedItem()" which I noted years ago: Currently selected item in dbExplorer, left or right pane (top most when more than one) So you could get that, turn it into a Name or Module, and compare that with the Current or whichever one you want.
There was discussion on HOW these modules are opened. The environment variable "DefOpenMode" that determines how a module opens Read/Shared/Write when you double click on it; and another variable "DefOpenLinkMode" that determines how a module is opened Read/Shared/Write when you follow a link to it. I set them both to "READ_ONLY", but I see that some CPS functions presume the CPS module is opened Shared; hate it when that happens. |